package cl.DAOs;

import org.hibernate.*;
import cl.POJOs.*;
import cl.DAOs.HibernateUtil;
import java.util.List;
import org.hibernate.criterion.Order;

public class AdminDAO {

    private Session session;

    public int verificarDatos(String user, String pass) throws Exception {
        int control = 0;

        try {
            session = HibernateUtil.getSessionFactory().openSession();
            if (user.equalsIgnoreCase("admin") && pass.equalsIgnoreCase("admin")) {
                control = 1;
            }
        } catch (Exception e) {
            throw e;
        }
        session.close();
        return control;

    }
}
